package com.abel.cloud.provider.dao;

import com.abel.cloud.common.po.UserAccountPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserAccountDao {
    @Select({"<script>",
            "SELECT id, user_name userName, gender, pwd, enabled, created_time createdTime",
            "FROM user_account",
            "where id=#{id}",
            "</script>"})
    UserAccountPO getById(@Param("id")Integer id);

    @Update({"<script>",
            "UPDATE user_account SET user_name = #{userName}",
            "WHERE id = #{id}",
            "</script>"})
    int updateById(UserAccountPO po);


}
